/**
 * Writed by yura and mak
 */

package wz.legend;

import java.util.Date;

public class StateContext {
    private Object state;
    private Date changeDate;
    
    public StateContext() {
        
    }

    public StateContext(Object state) {
        setState(state);
    }

    public Object getState() {
        return state;
    }

    public void setState(Object state) {
        if(this.state != state) {
            this.state = state;
            this.changeDate = new Date();
        }
    }

    public Date getChangeDate() {
        return changeDate;
    }
}
